-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clickhouse] Internal monitoring endpoint #7114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
clickhouse-admin/api/src/lib.rs
Outdated
@@ -136,4 +150,17 @@ pub trait ClickhouseAdminSingleApi { | |||
async fn init_db( | |||
rqctx: RequestContext<Self::Context>, | |||
) -> Result<HttpResponseUpdatedNoContent, HttpError>; | |||
|
|||
/// Retrieve time series from the system database. The value the average of all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second sentence appears to be typo'd. Not sure what you are trying to say.
Also, I'd move that sentence after a blank line, so that the doc comments have a short first line. Same for the method above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, idk what was happening there 😄
let log = self.log.clone().unwrap(); | ||
let query = settings.query_avg(); | ||
|
||
info!(&log, "Querying system database"; "query" => &query); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be an info
log? What about a debug
or trace
log instead?
Overview
This commit adds an endpoint to retrieve timeseries from the
system
database. For the time being we will only add support for themetric_log
andasynchronous_metric_log
tables.This endpoint is still a bit bare bones, but will be a good start to begin monitoring the ClickHouse servers.
Examples
Queries per second
Disk usage
Related: #6953